package com.vsd.repository;


import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RestResource;

import com.vsd.domain.UserCollect;


@RestResource(exported = false)
public interface UserCollectionRepository extends CrudRepository<UserCollect, String> {
	
	
	@Query("select count(1) from UserCollect where uid = ?1 and type = ?2 and fid = ?3")
	int isCollect(String userId,Integer type,String fid);
	
}
